package com.example.shixunandjavagotoyangchen.BoosYang.Day002.Day002_11012;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.example.shixunandjavagotoyangchen.R;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
 * 作者:二徒
 * 时间：2021/11/2- 15:24
 * 功能实现：
 */
public class ChaotongAdpter extends BaseQuickAdapter<ChaotongBean.ShujuBean, BaseViewHolder> {

    public ChaotongAdpter( @Nullable List<ChaotongBean.ShujuBean> data) {
        super(R.layout.fenleinanzhuangshang, data);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, ChaotongBean.ShujuBean shujuBean) {
        baseViewHolder.setText(R.id.fenleinanshang_text,shujuBean.getName());
        Glide.with(getContext()).load(shujuBean.getImg()).into((ImageView) baseViewHolder.getView(R.id.fenleinanshang_img));
    }
}
